<template lang="pug">
div.module-wrapper.module(:style="styles")
  template(v-if="!notTitle")
    slot(name="header")
      Heading1(:title="title")
        template(slot="filter")
          slot(name="filter")
  div.content-container
    slot
</template>

<script>
export default {
  name: "ModuleWrapper",
  props: {
    flex: {
      type: [String, Number],
      default: 'unset',
    },
    notTitle: {
      type: Boolean,
      default: false,
    },
    title: {
      type: String,
      default: '',
    }
  },
  computed: {
    styles() {
      return {
        'flex': this.flex,
      }
    }
  }
}
</script>

<style lang="scss" scoped>
.module-wrapper{
  display: flex;
  flex-direction: column;
  .content-container{
    padding-top: rem(20);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}
</style>
